home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS064.dsk
/
DEPRECIATION AMOUNT.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
739b
|
25 lines
10 PRINT "DEPRECIATION AMOUNT"
20 PRINT
30 PRINT "ORIGINAL PRICE";
40 INPUT P
50 PRINT "DEPRECIATION RATE";
60 INPUT I
69 REM - CONVERT FROM PERCENT TO DECIMAL
70 I = I/100
80 PRINT "--(ENTER YEAR=0 WHEN NO MORE AMOUNTS DESIRED FOR THIS ITEM)--"
90 PRINT "YEAR";
100 INPUT Y
109 REM - THROUGH CALCULATING FOR THIS ITEM?
110 IF Y = 0 THEN 160
119 REM - CALCULATE DEPRECIATION AMOUNT BY FORMULA
120 D = P *I *(1 -I) ^(Y -1)
129 REM - ROUND OFF TO NEAREST CENT, PRINT
130 PRINT "DEPRECIATION = $"; INT(D *100 +.5)/100
140 PRINT
149 REM - RETURN FOR NEXT YEAR NUMBER
150 GOTO 90
159 REM - RESTART OR END PROGRAM?
160 PRINT "MORE DATA (1=YES, 0=NO)";
170 INPUT X
180 IF X = 1 THEN 20
190 PRINT "<CTRL-D>RUNHELLO"